<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Hello World!</title>
    <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
</head>
<body style="background: white;">
    <div>
        <input type="file" name=""  id="file">
    </div>
    <div>
        <input type="text" value="D:\hqk\projects\study-electron\nodepad\a.db" id="input1">
        <button id="btn1">btn1</button>
        <button id="get_note">get_note</button>
        <button id="set_note">set_note</button>
    </div>

    <script>
        onload=function(){

            file.onchange=function(){
                input1.value=file.files[0].path
            }

            btn1.addEventListener("click",function(){
                //请求读取note
                var filepath = input1.value
                Caller.select_db(filepath,function(status,data){
                    console.log(status,data)
                },4000)

            })
            get_note.addEventListener("click",function(){
                Caller.get_note("test",function(status,data){
                    console.log(status,data)
                },4000)
            })
            set_note.addEventListener("click",function(){
                Caller.set_note_text("test","你好",function(err){
                    console.log(err)
                },4000)
            })

        }
        

    </script>
</body>
</html>
